home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / amos / AMOSL0495.lzh / AMOSLIST / 000043_svcs1.digex.net!amos-request_ Sat Apr 8 12:08:15 1995 remote from earth.msg < prev    next >
Internet Message Format  |  1995-05-01  |  2KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224]) by earth.usa.net (8.6.10/8.6.10) with SMTP id MAA18740 for <lee.kitchens@georgia.com>; Sat, 8 Apr 1995 12:08:12 -0600
  2. Received: by svcs1.digex.net id AA11000
  3.   (5.67b8/IDA-1.5 for amos-out); Sat, 8 Apr 1995 11:04:01 -0400
  4. Received: from nfs1.digex.net by svcs1.digex.net with SMTP id AA10996
  5.   (5.67b8/IDA-1.5 for <amos@svcs1.digex.net>); Sat, 8 Apr 1995 11:04:00 -0400
  6. Received: from seraph.uunet.ca (uunet.ca) by nfs1.digex.net with SMTP id AA10628
  7.   (5.67b8/IDA-1.5 for <amos-list@access.digex.net>); Sat, 8 Apr 1995 11:03:58 -0400
  8. Received: from portnoy.canrem.com ([198.133.42.17]) by mail.uunet.ca with SMTP id <202217-2>; Sat, 8 Apr 1995 11:05:10 -0400
  9. Received: from canrem.com by portnoy.canrem.com (4.1/SMI-4.1)
  10.     id AA11094; Sat, 8 Apr 95 11:00:19 EDT
  11. Received: by canrem.com (PCB-UUCP 1.1f)
  12.     id 1DA9F3; Sat,  8 Apr 95 10:57:49 -0500
  13. To: earth!access.digex.net!amos-list
  14. Reply-To: earth!canrem.com!CRSO.Amos
  15. Sender: earth!canrem.com!CRSO.Amos
  16. Subject: Re: stdin/stdout
  17. From: earth!canrem.com!mike.pelletier (Mike Pelletier)
  18. Message-Id: <60.2113.6587.0C1DA9F3@canrem.com>
  19. In-Reply-To: <9504081318.AA16686@goober.mbhs.edu>
  20. Date: Sat, 8 Apr 1995 11:54:00 -0400
  21. Organization: CRS Online  (Toronto, Ontario)
  22. Status: O
  23. X-Status: 
  24.  
  25. Your procedures were:
  26.  
  27. Procedure STDOUT[A$]
  28. FILE=Doscall(-60) : Rem Get stdout file handle
  29. If FILE : Rem Only do this if we have a stdout
  30. Dreg(1)=FILE
  31. Dreg(2)=Varptr(A$)
  32. Dreg(3)=Len(A$)
  33. DUMMY=Doscall(-48)
  34. End If
  35. End Proc
  36.  
  37. The stdout works fine
  38.  
  39. Procedure STDIN_CHAR
  40. FILE=Doscall(-54)
  41. If FILE
  42. C$=" "
  43. Dreg(1)=FILE
  44. Dreg(2)=Varptr(C$)
  45. Dreg(3)=1
  46. N=Doscall(-42)
  47. If N=0 : Rem Check for EOF
  48. C$=""
  49. End If
  50. Else
  51. C$=""
  52. End If
  53. End Proc[C$]
  54.  
  55. stdin char works ok the first time, then skips if called a second time in the
  56. program
  57.  
  58. Procedure STDIN_LINE
  59. FILE=Doscall(-54)
  60. If FILE
  61. A$=" "
  62. STDIN_CHAR : C$=Param$
  63. While C$<>Chr$(13) and Len(C$)>0 : Rem chr$(13)
  64. A$=A$+C$
  65. STDIN_CHAR : C$=Param$
  66. Wend
  67. Else
  68. A$=""
  69. End If
  70. End Proc[A$]
  71.  
  72. stdin line seems to work (but chr$(13) isn't the terminator that worked, I had
  73. to change it to chr$(10)) but the first charater is replaced by the second.
  74. "fred" shows up as "rred"
  75.  
  76. Well met and godspeed,
  77.                       Giark
  78.